<?php
/**
 * @copyright   Copyright (c) 2017 https://www.sapixx.com All rights reserved.
 * @license     Licensed (http://www.apache.org/licenses/LICENSE-2.0).
 * @author      pillar<ltmn@qq.com>
 * 商品分类
 */
namespace app\bestbao\validate;
use think\Validate;

class Order extends Validate{

    protected $rule = [
        'id'                => 'require|number',
        'member_miniapp_id' => 'require|number',
        'engineer_id'       => 'require|number',
        'uid'               => 'require|number',
        'title'             => 'require',
        'question'          => 'require',
        'urgent'            => 'require|number',
        'imgs'              => 'require',
        'order_no'          => 'require',
        'state'             => 'require|number',
        'solve_time'        => 'require',
        'change_id'         => 'require|number',
        'change_engineer'   => 'require',
    ];

    protected $message = [
        'id'                => 'ID丢失',
        'member_miniapp_id' => '应用丢失',
        'engineer_id'       => '工程师必须选择',
        'uid'               => '用户必须选择',
        'title'             => '标题必须填写',
        'question'          => '问题必须填写',
        'urgent'            => '重要程度必须选择',
        'imgs'              => '图片必须选择',
        'order_no'          => '订单号丢失',
        'state'             => '订单状态丢失',
        'solve_time'        => '预计服务时间必须填写',
        'change_id'         => '流转人员必须选项',
        'change_engineer'   => '流转人员必须选项',

    ];
    protected $scene = [
        'add'         => ['title', 'question', 'urgent', 'imgs', 'address', 'phone', 'realname'],
        'edit'        => ['id', 'title', 'question', 'urgent', 'imgs', 'address', 'phone', 'realname'],
        'order'       => ['order_product_id', 'urgent','title'],
        'doOrder'     => ['id','solve_time'],
        'changeOrder' => ['id','change_id','change_engineer'],
    ];

}